package com.watt.core.mvc.service.impl;

import com.watt.core.mvc.dao.QaMediaMapper;
import com.watt.core.mvc.entity.QaMedia;
import com.watt.core.mvc.service.IQaMediaService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 知识库媒体素材
 */
@Service
public class QaMediaServiceImpl extends ServiceImpl<QaMediaMapper, QaMedia> implements IQaMediaService {
    public String queryMediaUrlByREFID(String key) {
        QaMedia qaMedia =  baseMapper.selectById(key);
        if(qaMedia == null){
            return null;
        }
        return qaMedia.getMediaUrl();
    }
}
